package com.xjm.i1.core.struct.node.load;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;

/**
 * 加载数据的顶层数据节点集合
 **/
@NoArgsConstructor
@AllArgsConstructor
@Data
public class I1DataCollections extends HashMap<String, I1DeviceCollections> {

    // 输入文件夹名 也是 生成的excel文件名
    private String generateName;

    // 输入文件夹路径
    private String inputPath;

    // 输出文件夹路径
    private String outputPath;

    public I1DeviceCollections getOrNewDeviceCollections(String deviceId) {
        boolean hasV = this.containsKey(deviceId);
        if (hasV) {
            return this.get(deviceId);
        } else {
            return new I1DeviceCollections(deviceId);
        }
    }
}
